import request from "@/utils/request.js";
import Cache from "@/utils/cache.js"
const url = '/salesman'

/**
 * 新增服务记事
#109240353

 */
export function note_service(data) {
  return request.post('/customer/note_service', data);
}

/**
 * 新增服务记事
#109240353

 */
export function edit(data) {
  return request.post('/customer/note_service/edit', data);
}
// 查询服务记事列表
export function list(data) {
  return request.post('/customer/note_service/list', data);
}
/**
 * 获取服务记事详细信息
 */
export function getNoteService(id) {
  return request.get(`/customer/note_service/${id}`);
}


/**
 * 删除服务记事
 */
export function note_servicedelete(id) {
  return request.delete(`/customer/note_service/${id}`);
}

/**
 * 获取当月优胜签到最多
 */
export function maxCountSign(data) {
  return request.get(url + '/salesman/getMaxCountSign', data);
}

/**
 * 获取当月优胜领取最多
 */
export function maxCount(data) {
  return request.get(url + '/salesman/getMaxCount', data);
}

/**
 * 获取我的队员统计-按年查询
 */
export function MyTeamByYear(year) {
  return request.get(url + `/salesman/getMyTeamByYear/${year}`);
}

/**
 * 获取当前登录的业务员的所有下级
 */
export const selectSalesMan = (data) => {
  return request.post(url + `/salesManMeeting/selectCSalesMan`, data);
}

/**
 * 获取队员每月数量
 */
export const salesMan = (salesmanId, year) => {
  return request.get(url + `/salesman/getCountBySalesman/${salesmanId}/${year}`)
}

/**
 * 获取业务员信息
 */
export const getInfo = (data) => {
  return request.get(url + `/salesman/info`, data)
}